package com.example.aop.controller;

import com.example.aop.bean.User;
import com.example.aop.service.TestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Create by Z on 2021/2/20.
 */
@RestController
public class TestController {

    @Autowired
    private TestService testService;

    @RequestMapping("/test")
    public User test(@RequestBody User user){
        //System.out.println(user);
        testService.test();
        return user;
    }

    @RequestMapping("/test2")
    public void test2(){
        testService.test2();
    }





}
